package com.yituo.mjworld.mvc.entity.web;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "user_status_record", schema = "web_mojianworld_server", catalog = "")
public class UserStatusRecord {
  private int recordId;
  private String userId;
  private String cause;
  private Timestamp createDate;
  private String processUserId;

  @Id
  @Column(name = "recordId", nullable = false)
  public int getRecordId() {
    return recordId;
  }

  public void setRecordId(int recordId) {
    this.recordId = recordId;
  }

  @Basic
  @Column(name = "userId", nullable = false, length = 36)
  public String getUserId() {
    return userId;
  }

  public void setUserId(String userId) {
    this.userId = userId;
  }

  @Basic
  @Column(name = "cause", nullable = true, length = 30)
  public String getCause() {
    return cause;
  }

  public void setCause(String cause) {
    this.cause = cause;
  }

  @Basic
  @Column(name = "createDate", nullable = true)
  public Timestamp getCreateDate() {
    return createDate;
  }

  public void setCreateDate(Timestamp createDate) {
    this.createDate = createDate;
  }

  @Basic
  @Column(name = "processUserId", nullable = false, length = 30)
  public String getProcessUserId() {
    return processUserId;
  }

  public void setProcessUserId(String processUserId) {
    this.processUserId = processUserId;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    UserStatusRecord that = (UserStatusRecord) o;

    if (recordId != that.recordId) return false;
    if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
    if (cause != null ? !cause.equals(that.cause) : that.cause != null) return false;
    if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
    if (processUserId != null ? !processUserId.equals(that.processUserId) : that.processUserId != null) return false;

    return true;
  }

  @Override
  public int hashCode() {
    int result = recordId;
    result = 31 * result + (userId != null ? userId.hashCode() : 0);
    result = 31 * result + (cause != null ? cause.hashCode() : 0);
    result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
    result = 31 * result + (processUserId != null ? processUserId.hashCode() : 0);
    return result;
  }
}
